﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Studio77.GuessLyric.Pages;
using Studio77.GuessLyric.Core;

namespace Studio77.GuessLyric.Views
{
    public partial class KeyItem : UserControl
    {
        public KeyItem()
        {
            InitializeComponent();
        }

        public string GetChar()
        {
            return this.btnContent.Content.ToString();
        }

        public void SetChar(string c)
        {
            this.btnContent.Content = c;
        }

        private void btnContent_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            SoundManager.PlayEffect(SoundManager.enter);
            if (GamePage.Instance.IsCanTypeNewChar())
            {
                // 在此处添加事件处理程序实现。
                Keyboard.KeyboardInstance.OnKeyDown(this);
            }
        }
    }
}
